<template>
  <el-config-provider :locale="locale">
    <RouterView />
  </el-config-provider>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { RouterView } from 'vue-router';
import { ElConfigProvider } from 'element-plus';
import useStore from '@/stores/index';

import zhCn from 'element-plus/es/locale/lang/zh-cn';
import en from 'element-plus/es/locale/lang/en';
const locale = computed(() => {
  const lang = useStore().langStore.getLang();
  return lang === 'en' ? en : zhCn;
});
</script>
<style scoped></style>
